package auth

// 权限以字符串的形式保存下来
// 分别是 admin teacher vip visitor

const (
	Admin   = "admin"
	Teacher = "teacher"
	VIP     = "vip"
	Visitor = "visitor"
)

// 判断是否为管理员
func IsAdmin(auth string) bool {
	return auth == Admin
}

// 判断是否为教师
func IsTeacher(auth string) bool {
	return auth == Teacher || auth == Admin
}

// 判断是否为游客
func IsVisitor(auth string) bool {
	return auth == Visitor
}

func IsVIP(auth string) bool {
	return auth != Visitor
}
